﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project.Models
{
    /// <summary>
    /// 消息
    /// </summary>
    public class Message:BaseModel
    {
        /// <summary>
        /// 如果是系统信息，则为“空”或“义齿家”，如果为用户之间则为用户Id
        /// </summary>
        [StringLength(50)]
        public string From { get; set; }

        public Guid To { get; set; }

        [Required]
        [StringLength(200)]
        public string Content { get; set; }
        /// <summary>
        /// 0:未读  1：已读  
        /// </summary>
        public int State { get; set; }

        public DateTime? ReceiveTime { get; set; }

        /// <summary>
        /// 消息类型（0：系统，1：用户）
        /// </summary>
        public int Type { get; set; }
    }
}
